home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 November / PCWorld_2006-11_cd.bin / domacnost a kancelar / easytime / ETT.exe / reports / xslt / SummaryTimesheetGroupByDay.xsl < prev    next >
Extensible Markup Language  |  2006-08-18  |  3KB  |  88 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     <xsl:output method="html" indent="yes"/>
  4.     <xsl:template match="/">
  5.         <html>
  6.          <head>
  7.            <link rel="stylesheet" type="text/css" href="style.css" />
  8.          </head>
  9.          <body>
  10.             <xsl:apply-templates select="/Report/HeaderInfo"></xsl:apply-templates>
  11.             <xsl:apply-templates select="/Report/Customer"></xsl:apply-templates>
  12.             <xsl:apply-templates select="/Report/Total" />
  13.         </body>    
  14.         </html>
  15.     </xsl:template>
  16.  
  17. <!-- ╨Æ╨╡╤Ç╤à╨╜╨╕╨╣ ╨╖╨░╨│╨╛╨╗╨╛╨▓╨╛╨║  -->
  18.     <xsl:template match="HeaderInfo">
  19.         <table class="TableSB" align="center" width="70%">
  20.             <tr>
  21.                 <td class="TableSB">
  22.                     <table class="TableSB" width="100%" cellpadding="2" cellspacing="0" >
  23.                         <tr>
  24.                             <td colspan="2" align="center" class="ReportTitleClass"><xsl:value-of select="/Report/@Type"/></td>
  25.                         </tr>
  26.                         <xsl:if test="Date">  <!--╨ò╤ü╨╗╨╕ ╤Å╨▓╨╜╨╛ ╨▓╤ï╨▒╤Ç╨░╨╜ ╨┤╨╕╨░╨┐╨░╨╖╨╛╨╜ ╨┤╨░╤é  -->
  27.                             <tr>
  28.                                 <td colspan="2" align="right" class="Date"><xsl:value-of select="Date/From"/> - <xsl:value-of select="Date/To"/></td>
  29.                             </tr>
  30.                         </xsl:if>
  31.                     </table>
  32.                 </td>
  33.             </tr>
  34.         </table>
  35.     </xsl:template>
  36.     
  37.     <xsl:template match="Customer">
  38.         <table align="center" width="70%">
  39.             <tr>
  40.                 <td class="CompanyName"><xsl:value-of select="@Name"/></td>
  41.             </tr>
  42.             <xsl:for-each select="Project">
  43.             <!--     <xsl:if test="SubTotal != "0:00"">  -->
  44.              <table align="center" width="70%">
  45.             <tr>
  46.              <td valign="top" class="ProjectName" colspan="2"><xsl:value-of select="@Name" /> </td>
  47.               </tr>
  48.                     <xsl:for-each select="Date">
  49.                         <tr>
  50.                             <td width="85%" valign="top" class="DetailRowDataClass"><xsl:value-of select="@Value"/></td>
  51.                             <td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="Hours"/></td>
  52.                         </tr>
  53.                     </xsl:for-each>
  54.                     <tr>
  55.                         <td width="85%" valign="top" class="SubTotal">Sub-total:</td>
  56.                         <td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="SubTotal"/></td>
  57.                     </tr>
  58.             <!--    </xsl:if>      -->
  59.         </table>
  60.         </xsl:for-each>
  61.         </table>
  62.     </xsl:template>
  63.     
  64.     <xsl:template match="Companies/Company">
  65.         <xsl:value-of select="text()"/>
  66.         <xsl:if test="following-sibling::*/text()">, </xsl:if>
  67.     </xsl:template>
  68.  
  69.     <xsl:template match="Projects/Project">
  70.         <xsl:value-of select="text()"/>
  71.         <xsl:if test="following-sibling::*/text()">, </xsl:if>
  72.     </xsl:template>
  73.  
  74.     <xsl:template match="Tasks/Task">
  75.         <xsl:value-of select="text()"/>
  76.         <xsl:if test="following-sibling::*/text()">, </xsl:if>
  77.     </xsl:template>
  78.  
  79.      <xsl:template match="/Report/Total">
  80.      <table width="70%" align="center">
  81.         <tr>
  82.             <td width="85%" class="Total">Total:</td>
  83.             <td class="Total"><xsl:value-of select="text()" /></td>
  84.        </tr>
  85.     </table>
  86.     </xsl:template>
  87.         
  88. </xsl:stylesheet>